package com.qqtech.qquan.order.service;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.order.enums.OrderPayWayDictEnum;
import com.qqtech.qquan.order.model.OrderPayLog;
import com.qqtech.qquan.order.model.OrderPayLogQuery;
import com.qqtech.qquan.order.model.OrderPayLogVo;

public interface OrderPayLogService extends BaseService<OrderPayLog> {
	/**
	 * 根据订单号查询该订单已支付过的记录，并返回已支付的款额
	 * 
	 * @param orderNo
	 *            订单号
	 * @param payWay
	 *            支付类型(如输入空则返回所有)
	 * @return
	 */
	BigDecimal getPayedByOrderNo(String orderNo, OrderPayWayDictEnum payWay);

	/**
	 * 后台查询记录数
	 * 
	 * @param query
	 * @return
	 */
	public int queryCountAdmin(OrderPayLogQuery query);

	/**
	 * 后台查询 -分页
	 * 
	 * @param query
	 * @param pageable
	 * @return
	 */
	public Page<OrderPayLogVo> queryPageListAdmin(OrderPayLogQuery query, Pageable pageable);

	/**
	 * 后台查询 -不分页
	 * 
	 * @param query
	 * @param pageable
	 * @return
	 */
	public List<OrderPayLogVo> queryListAdmin(OrderPayLogQuery query, Pageable pageable);

	/**
	 * 根据订单号查询该订单的商家让利的总额
	 * 
	 * @param orderNo
	 *            订单号
	 * @param payWay
	 *            支付类型(如输入空则返回所有)
	 * @return
	 */
	public BigDecimal getShopDiscountByOrderNo(String orderNo, OrderPayWayDictEnum payWay);
}